![]() 04/27/2015 at 18:06 • Filed to: None | ![]() | ![]() |
I can’t wrap my head around how to use it... can someone please help me? It just makes no sense with what it is telling me to do (or not telling me in this case)
![]() 04/27/2015 at 18:08 |
|
Sounds like MatLab is working 100%.
![]() 04/27/2015 at 18:09 |
|
of course -_-
![]() 04/27/2015 at 18:10 |
|
I have Vietnam flashbacks to a 2nd year degree assignment where I had to use MATLAB whenever anyone mentions it. I hate that program with a passion. What are you trying to do with it?
![]() 04/27/2015 at 18:13 |
|
Never used MatLab. We use WeBWorK.
![]() 04/27/2015 at 18:13 |
|
MatLab: "Our programmers look forward to joining the Kinja development crew!"
![]() 04/27/2015 at 18:14 |
|
Our stupid (not really, I’m just pissed at him) programming teacher decided it would be a good idea to go from learning Python for the past 6-7 months to learning MatLab for the last 3 weeks before we graduate... WHAT THE HELL?!
Anyways, I’m trying to figure out how to separate out the odd (1,1 1,3 1,5...) indices from the evens (1,2 1,4 1,6...) but I can’t figure out how :(
![]() 04/27/2015 at 18:14 |
|
Could be worse...
![]() 04/27/2015 at 18:15 |
|
They were rejected for being too bad
![]() 04/27/2015 at 18:16 |
|
Matlab, where x=3 does not equal 3=x nor does .5 = 1/2
![]() 04/27/2015 at 18:16 |
|
What do you want to do after you separate them? Are you performing a function on that indexed value immediately or do you want to store them for later use?
![]() 04/27/2015 at 18:16 |
|
I’ve written an acceleration simulation for automobiles in MATLAB, I may be able to help. What are you having problems with?
![]() 04/27/2015 at 18:18 |
|
Ah I’m afraid I can’t really help you with that, I just used it to run iterations of complex equations. There was a forum I used when doing my assignment that people helped me on, I forget the name now but google around and you should find it.
![]() 04/27/2015 at 18:19 |
|
IDK to be honest... this is like some foreign language to me
What I am honestly worried about though is something like what happened to Bandit happening to me (even though I’m only in high school and its not really for a grade on my college transcript)
![]() 04/27/2015 at 18:19 |
|
Figuring out how to pull certain numbers out of a matrix
![]() 04/27/2015 at 18:20 |
|
was it StackOverflow?
![]() 04/27/2015 at 18:22 |
|
I don’t think so.
![]() 04/27/2015 at 18:24 |
|
What ever, this shit SUCKS... I am wishing that I had never taken programming now... even though I enjoyed it for the past 8.5 months :(
![]() 04/27/2015 at 18:26 |
|
I became rather angry with my MATLAB assignment too, it was my worst mark in that module. I’m sure you’ll manage though, if you do programming. I’m a mechanical engineer so anything with code is completely alien to me.
![]() 04/27/2015 at 18:27 |
|
I’m not even very good with Python to be honest... :(
This is just flat out confusing and is making me want to punch a hole in something
![]() 04/27/2015 at 18:28 |
|
MatLab’s scripting language uses a format and syntax very similar to Python.
What you need to do is use a for-loop that runs for the size of the array, and divide your iterator by 2 each run, checking for a remainder . No remainder, then the index is even and the value associated with it can be operated on according to whatever parameters you’ve set for the values indexed to even numbers.
For a multi-dimensional array, you’ll have to define for me what makes it even. If it were me, I’d index them all to a single-dimension array and go from there.
![]() 04/27/2015 at 18:30 |
|
so like a:
for size(array):
size/2
something like that?
what about the edit window and functions?
![]() 04/27/2015 at 18:31 |
|
I once put a pen through a calculator screen because I was angry at an assignment. I’ve almost completed my degree now. The frustration passes eventually and you get by, just take a break and come back to it with a fresh head, or even better work alongside some classmates so you can pool your skills.
![]() 04/27/2015 at 18:34 |
|
The issue is that the assignment was due today... and nobody else got it done either :/
The teacher is doing a shit job teaching us like he is being paid to do...
![]() 04/27/2015 at 18:36 |
|
That sucks, I had a lecturer like that last year. A lot of people failed his exam, including me...
![]() 04/27/2015 at 18:40 |
|
I emailed him, maybe he’ll actually respond... I also have a precalculus test in his class tomorrow :/ gotta get that review done... ugh
![]() 04/27/2015 at 18:45 |
|
Hopefully he cuts you a break if everyone else is struggling.
![]() 04/27/2015 at 18:47 |
|
I doubt it... everyone except one or two other is struggling
Then again one is a national merit scholar... (smartest of the smart people)
![]() 04/27/2015 at 18:54 |
|
Surely he’ll have to make some allowances if everyone is failing his class though.
![]() 04/27/2015 at 18:58 |
|
No, not a college class and no one is failing right now
Its this fucking assignment that is causing so many issues... he JUST assigned a MatLab unit and started teaching it 2 weeks from graduation (so no one has any motivation left)
![]() 04/27/2015 at 19:00 |
|
it could be worse... Matlab is confusing, but Minitab is completely fucking obtuse.
![]() 04/27/2015 at 19:29 |
|
MatLab is impossible to learn after learning Python ONLY for 7+ months
![]() 04/27/2015 at 19:33 |
|
Hey cheer up, it could have been Fortran. :p
![]() 04/27/2015 at 19:35 |
|
Gotcha, see this link for a full explanation: http://www.mathworks.com/company/newsle…
Basically, as an example if you have a simple single-row matrix in the variable “x”, you could call the second value by using “x(1)“, fourth value by “x(4)“, and so on.
If you have a multi-row matrix again using “x” as the variable, you call by using (row:column) as the operator. If you want the second row, first column number you call “x(2,1)“, first row fourth column called by “x(1,4)“, and so on.
Calling a certain range in rows and columns is explained by the link provided, I don’t have as much experience with doing that so I’ll let the link explain it.
Hope that helps.
![]() 04/27/2015 at 19:37 |
|
WHAT THE HELL ARE THESE THINGS YOU SPEAK OF?!
![]() 04/27/2015 at 19:38 |
|
I just think I’m going to wait until tomorrow and get some help directly from the teacher... I’m already pissed enough as it is. I don’t want to get more frustrated and just smash something out of anger :P
![]() 04/27/2015 at 19:41 |
|
Eldritch code spoken of only in hushed whispers, rumored to control space and time. Unfortunately, those capable of understanding it are deemed insane and dangerous to themselves and others.
![]() 04/27/2015 at 19:44 |
|
:(
![]() 04/27/2015 at 20:24 |
|
My brother knows, hes around here somewhere. comment on one of his posts if you have to
![]() 04/27/2015 at 21:26 |
|
Well, here’s a sample I just threw together, written in MatLab code . It expires in one day, so look at it now.
The outputs are 5 for evenSum and 5 for oddSum, as they should be. Play around with it.
Edit: Holy FUCK Kinja has an absolutely garbage editor. Even the Code function doesn’t work right. What good is it if I can’t show whitespace!? Click the Pastebin link above.
![]() 04/27/2015 at 22:13 |
|
Neat, I’ll look over it in a bit (I’m busy right now)
![]() 04/27/2015 at 22:14 |
|
Yeah everyone here runs out of fucks about a month before term finishes.
![]() 04/27/2015 at 23:01 |
|
We ran out of fucks to give at about mid February (and we graduate May 17th)
The term is “Senioritis”